package han.cirno.corrupt.components.refresh

import kotlinx.coroutines.CoroutineDispatcher

interface BackgroundTask<T:StatusReceiver> {
    val dispatcher:CoroutineDispatcher
    val name:Int?
    suspend fun T.runTask():Result

    enum class Result{ Continue,Abort }
    enum class Status{ None,Loading,Finished,Failed,Empty,AllDone }
}